﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserPicker.aspx.cs" Inherits="Card.Manager.Controls.UserPicker1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>SysUser Picker</title>
    <link href="../Css/Style.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        function closeWindow(id){
            window.opener.document.getElementById('<%=this.CIDUserID %>').value=id;
            <%if(this.AutoPostBack){ %>
            window.opener.document.getElementById('<%=this.CIDSubmitButton %>').click();
            <%} %>            
            window.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <table class="TB">
            <tr>
                <td style="width: 20%" class="TD_Input_Text">
                    部门：
                </td>
                <td style="width: 30%" class="TD_Input">
                    <asp:DropDownList ID="dropDept" CssClass="Input_Middle" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="TD_Input_Text">
                    条件:
                </td>
                <td colspan="3" class="TD_Input">
                    <asp:TextBox ID="txtSearch" CssClass="Input_Search" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4" align="center" class="TD_Input">
                    <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <div>
                        <span style="float: left">是否有效：
                            <asp:DropDownList ID="dropIsActive" CssClass="Input_Short" runat="server">
                                <asp:ListItem Value="">全部</asp:ListItem>
                                <asp:ListItem Value="Y">有效</asp:ListItem>
                                <asp:ListItem Value="N">失效</asp:ListItem>
                            </asp:DropDownList>
                        </span><span style="float: right">显示条数：
                            <asp:TextBox ID="txtRecords" runat="server" Text="50" CssClass="Input_Short"></asp:TextBox>
                        </span>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <asp:Repeater ID="rptList" runat="server">
                        <HeaderTemplate>
                            <table class="TB">
                                <tr class="TB_Header">
                                    <td>
                                        选择
                                    </td>
                                    <td>
                                        工号
                                    </td>
                                    <td>
                                        用户名
                                    </td>
                                    <td>
                                        昵称
                                    </td>
                                    <td>
                                        真实姓名
                                    </td>
                                    <td>
                                        是否有效
                                    </td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="TB_Item">
                                <td align="center">
                                  <a href="javascript:void(0);closeWindow('<%# Eval("USER_ID").ToString() %>');">选择</a>
                                </td>
                                <td>
                                    <%# Eval("EMPLOYEE_NUMBER")%>
                                </td>
                                <td>
                                    <%# Eval("USER_NAME")%>
                                </td>
                                <td>
                                    <%# Eval("NICK_NAME")%>
                                </td>
                                <td>
                                    <%# Eval("REAL_NAME")%>
                                </td>
                                <td>
                                    <%# Eval("IS_ACTIVE")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr class="TB_Alter">
                                <td align="center">
                                  <a href="javascript:void(0);closeWindow('<%# Eval("USER_ID").ToString() %>');">选择</a>
                                </td>
                                <td>
                                    <%# Eval("EMPLOYEE_NUMBER")%>
                                </td>
                                <td>
                                    <%# Eval("USER_NAME")%>
                                </td>
                                <td>
                                    <%# Eval("NICK_NAME")%>
                                </td>
                                <td>
                                    <%# Eval("REAL_NAME")%>
                                </td>
                                <td>
                                    <%# Eval("IS_ACTIVE")%>
                                </td>
                            </tr>
                        </AlternatingItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </td>
            </tr>
            <tr>
              <td align="center" colspan="4">
                <input type="button" value="取消" onclick="window.close();return false;" />
              </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
